<template>
  <div class="content">

    <!-- 顶部topbar -->
    <content-topbar @changeRoute="changeRoute"></content-topbar>

    <!-- 路由切换 -->
    <router-view></router-view>
  </div>
</template>

<script>
import ContentTopbar from '@/views/Content/ContentTopbar';

export default {
  name: 'Content',
  components: { ContentTopbar },
  methods: {
    changeRoute(value) {
      this.$store.commit('setInitContentRoute', value[1]);
      this.$router.push(value[0]);
    }
  }
}
</script>

<style lang="less">
.content {
  width: 100%;
  height: 100%;
  background-color: #f7f7f7;
}
</style>